/**
 *    SPDX-License-Identifier: Apache-2.0
 */

import React from 'react';
import ReactDOM from 'react-dom';
import './static/css/reset.css';
import { Provider } from 'react-redux';
import createStore from './store/index';
import { getChannelList } from './store/actions/chanelList/action-creators';
import { getChannel } from './store/actions/channel/action-creators';
import './static/css/style.css';
import 'bootstrap/dist/css/bootstrap.css';
import App from './components/App/App';
import registerServiceWorker from './registerServiceWorker';
import { BrowserRouter ,HashRouter as Router } from 'react-router-dom';

const store = createStore();
store.dispatch(getChannel());
store.dispatch(getChannelList());
/**
 * 在app 组件中调用landpage 。landpage就是那个闪屏界面。
   现在需要修改这里 先加载登录界面。登录后显示闪屏界面 。
   目前看就是新增一个登录组件登录公共后，跳转到app。
*/
ReactDOM.render(
	<Router>
    <Provider store={store} >
        <App />
    </Provider></Router>, document.getElementById('root')
);
registerServiceWorker();
